# Contributor: prspkt <prspkt@protonmail.com>
# Maintainer: prspkt <prspkt@protonmail.com>
pkgname=py3-pyhamcrest
_pkgname=PyHamcrest
pkgver=2.0.2
pkgrel=0
pkgdesc="Hamcrest framework for matcher objects"
url="https://github.com/hamcrest/PyHamcrest"
arch="noarch"
license="BSD-3-Clause"
depends="py3-six"
makedepends="py3-setuptools"
checkdepends="py3-hypothesis py3-mock py3-pytest"
source="$_pkgname-$pkgver.tar.gz::https://github.com/hamcrest/PyHamcrest/archive/V$pkgver.tar.gz"
builddir="$srcdir/"$_pkgname-$pkgver

replaces="py-hamcrest" # Backwards compatibility
provides="py-hamcrest=$pkgver-r$pkgrel" # Backwards compatibility

prepare() {
	default_prepare
	rm -f pytest.ini
}

build() {
	python3 setup.py build
}

check() {
	PYTHONPATH="build/lib" py.test-3
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="d6e510ca1e6533b425b424d411e23c4ee2a6bad2d635695e4e68f991fbdc57269c3a433361e431cb5dda7891278951d5de7a05f5c1c167714eecdaf74644d1c8  PyHamcrest-2.0.2.tar.gz"
